﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
        <link rel="Stylesheet" type="text/css" href="Common/PhotoBrowser.css" />
    <style type="text/css">
        .style1
        {
            font-weight: normal;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="displayAlbumsPanel" runat="server">
        <h1>Existing albums</h1>
        <table class="mainTable" runat="server" id="albumsTable"  cellpadding="0" cellspacing="0">
            <tr>
                <td style="text-align: center; height: 100px; background-color: #f6f6f6; border: solid 1px #606060;">No albums available...</td>
            </tr>
        </table>     
        <asp:Panel ID="enterEditModePanel" runat="server">
            <h1>Enter edit mode</h1>
            <p>Just click on <b>enter edit mode</b> link, then you can create new album, edit 
                existing album, upload photos, change thumbnail, type description and title. If 
                you want you can delete the existing album.</p>
            
            <div class="createNewAlbumLine">
                <asp:LinkButton CssClass="createAlbumLink" ID="enterEditModeLinkButton" 
                    runat="server" Text="Enter edit mode" onclick="enterEditModeLinkButton_Click" />
            </div>
        </asp:Panel>
        <asp:Panel ID="exitEditModePanel" runat="server" Visible="false">
        <h1>You are in edit mode</h1>
        <p style="font-weight: 700"><b>Congratulations!</b> <span class="style1">You are in 
            edit mode, so you can create a new album by clicking </span><span>Create new 
            album link.<span class="style1"> Of course you can edit existing albums or 
            photos. You can modify titles, descriptions. All edit fuctions are available for 
            you until clicking on </span>Exit edit mode<span class="style1"> link.</span></span></p>
        <div class="createNewAlbumLine">
            <asp:LinkButton CssClass="createAlbumLink" ID="createNewAlbumLinkButton" 
                Text="Create new album..." runat="server" 
                onclick="createNewAlbumLinkButton_Click"></asp:LinkButton>
        </div>   
        <div class="createNewAlbumLine">
            <asp:LinkButton CssClass="createAlbumLink" ID="exitEditModeLinkButton" 
                Text="Exit edit mode" runat="server" 
                onclick="exitEditModeLinkButton_Click"></asp:LinkButton>
        </div>   
        </asp:Panel>
        </asp:Panel>
        <asp:Panel ID="createAlbumPanel" runat="server" Visible="false">
        <h1>Create new album</h1>
        <p>Type a name for album to be created then you can upload images.</p>
        <table class="createAlbumTable" cellpadding="0" cellspacing="0">
            <tr>
                <td class="createAlbumLabelCell">Name of new album:</td>
                <td class="createAlbumDataCell">
                    <asp:TextBox CssClass="albumNameTextBox" 
                        ID="albumNameTextBox" runat="server" />                    
                </td>
            </tr>
            <tr>
                <td class="createAlbumLabelCell">&nbsp;</td>
                <td class="createAlbumDataCell">
                    <asp:RequiredFieldValidator ID="albumNameValidator" runat="server" 
                        ControlToValidate="albumNameTextBox" ErrorMessage="The album name is required!" 
                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" class="createAlbumButtonCell">
                    <asp:Button CssClass="button" 
                        ID="createAlbumButton" runat="server" 
                        Text="Create album" 
                        onclick="createAlbumButton_Click" />
                    <asp:Button CssClass="button" ID="cancelCreateAlbumButton" runat="server" 
                        Text="Cancel" UseSubmitBehavior="False" CausesValidation="False" 
                        onclick="cancelCreateAlbumButton_Click" /></td>
            </tr>
        </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
